package com.itheima.d7_interface_demo;

import java.util.ArrayList;

public class Studentjiek2 implements Studentjieko {
    @Override
    public void manage(ArrayList<Student> stu) {

        for (int i = 0; i < stu.size(); i++) {
            Student student = stu.get(i);
            System.out.println(student.getName() + " " + student.getGender() + " " + student.getScore());

        }

    }

    @Override
    public void putScore(ArrayList<Student> stu) {
        double allscore = 0;
        for (int i = 0; i < stu.size(); i++) {
            Student student = stu.get(i);
            allscore += student.getScore();
        }
        System.out.println("平均成绩：" + allscore / stu.size());
    }
}
